// CallsTable.h : CallsTable is used to keep track of all the calls made in each procedures.
// Author: Achyut P Balaji
//
#ifndef CALLS_TABLE_H
#define CALLS_TABLE_H

#include"SPA_Data_Types.h"

using namespace std;

typedef vector<PROC_INDEX> PROCS;

class CallsTable {
private:
	vector<PROC_INDEX> procList;
	vector<PROCS> callsList;
	static CallsTable *obj;
	CallsTable();
public:
	static CallsTable* getInstance();
	BOOLEAN insertCall(PROC_INDEX p1, PROC_INDEX p2);
	BOOLEAN isCalled(PROC_INDEX p1, PROC_INDEX p2);
	PROC_LIST getProcCalled(PROC_INDEX p);
	PROC_LIST getProcList(PROC_INDEX p);
	PROC_LIST getList(PROC_INDEX p);
	void initialise(int size);
};
#endif